package com.iflytek.testtoastwindow;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;

public class MainActivity extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        findViewById(R.id.btnSuperTest).setOnClickListener(new OnClickListener() {
            @Override
            public void onClick(View v) {
                GlobalDialog dialog = new GlobalDialog(MainActivity.this);
                dialog.setContentView(R.layout.layout_float);
                dialog.show();
            }
        });


        findViewById(R.id.btnTest).setOnClickListener(new OnClickListener() {

            @Override
            public void onClick(View v) {
                PhoneShowAlertWindowManager.showTopWindow(MainActivity.this, getLayoutInflater().inflate(R.layout.layout_float, null), true);
            }
        });
    }
}
